<?php
	session_start();
	/**
	* @package ParkFind
	* @desc This is the About Us page.
	*/
	/**
	* @desc This include file will load the directory settings for the Smarty Templates
	*/
	require 'includes/smarty.inc';
	$smarty->assign('user_id', $_SESSION["user_id"]);	
	$smarty->assign('title', "About Us");	
	$smarty->assign('last', $_SESSION["lastviewed"]);
	$smarty->assign('firstname', $_SESSION["firstname"]);
	$smarty->assign('role', $_SESSION["role"]);
   $smarty->assign('top5', $_SESSION["top5"]);	
   $smarty->display('header.tpl');
	
	/**
	* @desc This include file will load the functions that are required to call 
	*		from the database
	*/
	require 'includes/db_functions.inc';
	/**
	* @desc This include file connects to the database.
	*/
	require 'includes/connect.inc';
	
	$top5 = getTop5($page);	
	
	if (!isset($_SESSION["top5"]))
	{
		$_SESSION["top5"] = array();	
	
		if ($top5)
		{
			// Iterate parks
			while ($row = mysql_fetch_array($top5))										
				$_SESSION["top5"][] = array('id' => $row["park_id"],
									'name' => $row["name"]);
		}
		
		mysql_close($connection); // Disconnect
		
	}
	


	$smarty->display('about.tpl');
	$smarty->display('footer.tpl');
?>